<extend name="Index/index" />
<block name="mu">

</block>
<block name="main">
<!-- start of page content -->
<div class="span8 page-content">
        <h1><{$list['title']}> <small> 发表者ID : <{$list['uid']}> </small></h1>
        <hr>
        <h3><{$list['text']}></h3>


		<!-- 以下是评论遍历 -->
		<hr>
		<div class="container">
			<section class="span6 articles-list">
	            <h3>最新评论</h3>
	            <ul class="articles" id="liList">
	                <volist name="relist" id="v">
	                    <li>
	                        <h4><a href="#">评论者ID:<{$v['uid']}></a></h4>
	                        <div class="article-meta"  style="overflow:hidden;text-overflow:ellipsis;">评论内容:<{$v['text']}></div><span class="article-meta">评论时间:<b><{$v['time']}></b><a href="#">顶</a> | <a href="#">踩</a></span>
	                    </li>
	                </volist>
	                <hr>
	                <li>没有更多评论...</li>
	            </ul>
	        </section>	
		</div>
        
        <!-- end of page content -->


			<form action="<{:U('Reply/add')}>" method="post">
	                <h3>评论:</h3>
	                <textarea name="text" id="myContainer" style="width: 580px;height: 200px;resize:none;"  placeholder="为了给大家营造一个良好的社区环境,请勿发表不良内容,违者将承担法律责任..."></textarea>
	                <br>
	                <input type="hidden" name="time" value="<{:date('Y-m-d H:i:s');}>">
	                <input type="hidden" id="userid" name="uid" value="<{:$_SESSION['user']['id']}>">
	                <input type="hidden" name="cid" value="<{$list['id']}>">
	                <button id="mySub">发布评论</button>
	        </form>	
        

</div>
<!-- end of page content -->
<script type='text/javascript' src='__PUBLIC__/home_style/js/jquery-1.8.3.min.js'></script>
<script>
//判断是否登陆
	$(function(){

			$("#mySub").click(function(){	
				if ($('#myContainer').val().length < 5) {	
					alert('评论不可少于 5 字');
					return false;
				}
			})
		

		// if ($('#myContainer').val() == '') {
		// 	$("#mySub").click(function(){		
		// 		alert($('#myContainer').val());
		// 		return false;
		// 	})
		// }

		
	})
</script>
</block>



